<body>
<table id='tbl'>
    <tr>
        <td>姓名</td>
        <td>年龄</td>
        <td>性别</td>
    </tr>
 </table><tr>
            <td>张三</td>
            <td>88</td>
            <td>男</td>
            </tr><tr>
            <td>李四</td>
            <td>49</td>
            <td>男</td>
            </tr><tr>
            <td>老张</td>
            <td>32</td>
            <td>男</td>
            </tr><tr>
            <td>小芳</td>
            <td>34</td>
            <td>女</td>
            </tr><tr>
            <td>小明</td>
            <td>18</td>
            <td>男</td>
            </tr><script>
var tb=document.getElementById('tbl');
var trs=tb.getElementsByTagName('tr');
for(i in users){
    if(i%2==0){
        trs[i].style.background='#ff0';
    }
}

    </script>
</body>